var props = ["count", "execSCount"];

function Dog() {
  this.storage = {};
  props.forEach((prop) => {
    Object.defineProperty(this, prop, {
      get() {
        return this.storage[prop] || 0;
      },
      set(count) {
        this.storage[prop] = count;
      },
    });
  });
}

var dog1 = new Dog();
console.log(dog1.count);
dog1.count++;
dog1.execSCount++;
console.log(dog1.count);
console.log(dog1.execSCount);
var dog2 = new Dog();
console.log(dog2.count);
dog2.count++;
dog2.execSCount++;
console.log(dog2.count);
console.log(dog2.execSCount);